Conventional protocol recognition systems can determine an application layer protocol (e.g., hypertext transfer protocol or HTTP, file transfer protocol or FTP, e-donkey protocol) of IP (Internet Protocol) packets based on a pattern matching process. For example, a conventional protocol recognition system can include a universal computer with pattern matching software. The universal computer can use the pattern matching software to compare the content of the IP packets with a set of patterns in the pattern matching software, so as to determine the protocol of the IP packets according to the result of the comparison. However, such conventional protocol recognition systems may not be able to determine the protocol of the IP packets fast enough.
In another example, a conventional protocol recognition system can be realized by a hardware circuit in an FPGA (field-programmable gate array). For example, an HDL (hardware description language) program such as a Verilog program for determining the protocol of the IP packets can be compiled to the hardware circuit. As such, the hardware circuit can process the IP packets so as to determine the protocol of the IP packets according to the HDL program. However, usually a relatively large FPGA is configured to load the hardware circuit, which can increase the size and the cost of the recognition system. Additionally, it would take a relatively long time to write the HDL program due to the complicated design of the hardware circuit. Moreover, any change to the patterns for the application layer protocol (e.g., HTTP, FTP, e-donkey protocol, BITTORRENT protocol, simple mail transfer protocol or SMTP), or any new protocol added to the Internet protocol suite, will need a programmer to re-write the HDL program, which would also take a relatively long time.